#pragma once


namespace mcore
{
	class View
	{
	public:
		View()
		{
			mLoaded = false;
			mName = "Empty View";
		}

		virtual void load() { mLoaded = true; }
		virtual void unload() { mLoaded = false; }
		virtual void onResize() {}
		virtual void update(float dt) {}
		virtual void draw() {}
		// returns whether it handled a message; it's not being used currently anyway!
		virtual bool onWindowMessage(UINT msg, WPARAM wParam, LPARAM lParam) { return false; }

		const std::string & getName() { return mName; }

		bool isLoaded() { return mLoaded; }

	protected:
		std::string mName;
		bool mLoaded;
	};

}
